/*
 * Class11 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
public class Class11 {
	private byte aByte181 = 6;
	private int anInt182 = 8;
	private Class29 aClass29_183;
	private Class29 aClass29_184;
	private Class29 aClass29_185;
	private Class29 aClass29_186;
	private Class29 aClass29_187;
	private Class29 aClass29_188;
	private Class29 aClass29_189;
	private Class29 aClass29_190;
	private int[] anIntArray191 = new int[5];
	private int[] anIntArray192 = new int[5];
	private int[] anIntArray193 = new int[5];
	private int anInt194;
	private int anInt195 = 100;
	private Class36 aClass36_196;
	private Class29 aClass29_197;
	int anInt198 = 500;
	int anInt199;
	private static int[] anIntArray200;
	private static int[] anIntArray201;
	private static int[] anIntArray202;
	private static int[] anIntArray203 = new int[5];
	private static int[] anIntArray204 = new int[5];
	private static int[] anIntArray205 = new int[5];
	private static int[] anIntArray206 = new int[5];
	private static int[] anIntArray207 = new int[5];

	public static final void method190() {
		Class11.anIntArray201 = new int[32768];
		for (int i = 0; i < 32768; i++) {
			if (Math.random() > 0.5) {
				Class11.anIntArray201[i] = 1;
			} else {
				Class11.anIntArray201[i] = -1;
			}
		}
		Class11.anIntArray202 = new int[32768];
		for (int i = 0; i < 32768; i++) {
			Class11.anIntArray202[i] = (int) (Math.sin(i / 5215.1903) * 16384.0);
		}
		Class11.anIntArray200 = new int[220500];
	}

	public final int[] method191(int i, int i_0_) {
		for (int i_1_ = 0; i_1_ < i; i_1_++) {
			Class11.anIntArray200[i_1_] = 0;
		}
		if (i_0_ < 10) {
			return Class11.anIntArray200;
		}
		double d = i / (i_0_ + 0.0);
		aClass29_183.method310(true);
		aClass29_184.method310(true);
		int i_2_ = 0;
		int i_3_ = 0;
		int i_4_ = 0;
		if (aClass29_185 != null) {
			aClass29_185.method310(true);
			aClass29_186.method310(true);
			i_2_ = (int) (((aClass29_185).anInt578 - (aClass29_185).anInt577) * 32.768 / d);
			i_3_ = (int) ((aClass29_185).anInt577 * 32.768 / d);
		}
		int i_5_ = 0;
		int i_6_ = 0;
		int i_7_ = 0;
		if (aClass29_187 != null) {
			aClass29_187.method310(true);
			aClass29_188.method310(true);
			i_5_ = (int) (((aClass29_187).anInt578 - (aClass29_187).anInt577) * 32.768 / d);
			i_6_ = (int) ((aClass29_187).anInt577 * 32.768 / d);
		}
		for (int i_8_ = 0; i_8_ < 5; i_8_++) {
			if (anIntArray191[i_8_] != 0) {
				Class11.anIntArray203[i_8_] = 0;
				Class11.anIntArray204[i_8_] = (int) (anIntArray193[i_8_] * d);
				Class11.anIntArray205[i_8_] = (anIntArray191[i_8_] << 14) / 100;
				Class11.anIntArray206[i_8_] = (int) (((aClass29_183).anInt578 - (aClass29_183).anInt577)
					* 32.768 * Math.pow(1.0057929410678534, anIntArray192[i_8_]) / d);
				Class11.anIntArray207[i_8_] = (int) ((aClass29_183).anInt577 * 32.768 / d);
			}
		}
		for (int i_9_ = 0; i_9_ < i; i_9_++) {
			int i_10_ = aClass29_183.method311(0, i);
			int i_11_ = aClass29_184.method311(0, i);
			if (aClass29_185 != null) {
				int i_12_ = aClass29_185.method311(0, i);
				int i_13_ = aClass29_186.method311(0, i);
				i_10_ += method192(-887, i_4_, (aClass29_185).anInt579, i_13_) >> 1;
				i_4_ += (i_12_ * i_2_ >> 16) + i_3_;
			}
			if (aClass29_187 != null) {
				int i_14_ = aClass29_187.method311(0, i);
				int i_15_ = aClass29_188.method311(0, i);
				i_11_ = i_11_
					* ((method192(-887, i_7_, (aClass29_187).anInt579, i_15_) >> 1) + 32768) >> 15;
				i_7_ += (i_14_ * i_5_ >> 16) + i_6_;
			}
			for (int i_16_ = 0; i_16_ < 5; i_16_++) {
				if (anIntArray191[i_16_] != 0) {
					int i_17_ = i_9_ + Class11.anIntArray204[i_16_];
					if (i_17_ < i) {
						Class11.anIntArray200[i_17_] += method192(-887,
							Class11.anIntArray203[i_16_], (aClass29_183).anInt579, i_11_
								* Class11.anIntArray205[i_16_] >> 15);
						Class11.anIntArray203[i_16_] += (i_10_ * Class11.anIntArray206[i_16_] >> 16)
							+ Class11.anIntArray207[i_16_];
					}
				}
			}
		}
		if (aClass29_189 != null) {
			aClass29_189.method310(true);
			aClass29_190.method310(true);
			int i_18_ = 0;
			boolean bool_19_ = true;
			for (int i_20_ = 0; i_20_ < i; i_20_++) {
				int i_21_ = aClass29_189.method311(0, i);
				int i_22_ = aClass29_190.method311(0, i);
				int i_23_;
				if (bool_19_) {
					i_23_ = ((aClass29_189).anInt577 + (((aClass29_189).anInt578 - (aClass29_189).anInt577)
						* i_21_ >> 8));
				} else {
					i_23_ = ((aClass29_189).anInt577 + (((aClass29_189).anInt578 - (aClass29_189).anInt577)
						* i_22_ >> 8));
				}
				i_18_ += 256;
				if (i_18_ >= i_23_) {
					i_18_ = 0;
					bool_19_ = !bool_19_;
				}
				if (bool_19_) {
					Class11.anIntArray200[i_20_] = 0;
				}
			}
		}
		if (anInt194 > 0 && anInt195 > 0) {
			int i_24_ = (int) (anInt194 * d);
			for (int i_25_ = i_24_; i_25_ < i; i_25_++) {
				Class11.anIntArray200[i_25_] += Class11.anIntArray200[i_25_ - i_24_] * anInt195
					/ 100;
			}
		}
		if ((aClass36_196).anIntArray613[0] > 0 || (aClass36_196).anIntArray613[1] > 0) {
			aClass29_197.method310(true);
			int i_26_ = aClass29_197.method311(0, i + 1);
			int i_27_ = aClass36_196.method355(0, true, i_26_ / 65536.0F);
			int i_28_ = aClass36_196.method355(1, true, i_26_ / 65536.0F);
			if (i >= i_27_ + i_28_) {
				int i_29_ = 0;
				int i_30_ = i_28_;
				if (i_30_ > i - i_27_) {
					i_30_ = i - i_27_;
				}
				for (/**/; i_29_ < i_30_; i_29_++) {
					int i_31_ = (int) (((long) Class11.anIntArray200[i_29_ + i_27_] * (long) Class36.anInt620) >> 16);
					for (int i_32_ = 0; i_32_ < i_27_; i_32_++) {
						i_31_ += (int) (((long) (Class11.anIntArray200[i_29_ + i_27_ - 1 - i_32_]) * (long) (Class36.anIntArrayArray618[0][i_32_])) >> 16);
					}
					for (int i_33_ = 0; i_33_ < i_29_; i_33_++) {
						i_31_ -= (int) (((long) Class11.anIntArray200[i_29_ - 1 - i_33_] * (long) (Class36.anIntArrayArray618[1][i_33_])) >> 16);
					}
					Class11.anIntArray200[i_29_] = i_31_;
					i_26_ = aClass29_197.method311(0, i + 1);
				}
				int i_34_ = 128;
				i_30_ = i_34_;
				for (;;) {
					if (i_30_ > i - i_27_) {
						i_30_ = i - i_27_;
					}
					for (/**/; i_29_ < i_30_; i_29_++) {
						int i_35_ = (int) (((long) Class11.anIntArray200[i_29_ + i_27_] * (long) Class36.anInt620) >> 16);
						for (int i_36_ = 0; i_36_ < i_27_; i_36_++) {
							i_35_ += (int) (((long) (Class11.anIntArray200[i_29_ + i_27_ - 1
								- i_36_]) * (long) (Class36.anIntArrayArray618[0][i_36_])) >> 16);
						}
						for (int i_37_ = 0; i_37_ < i_28_; i_37_++) {
							i_35_ -= (int) (((long) (Class11.anIntArray200[i_29_ - 1 - i_37_]) * (long) (Class36.anIntArrayArray618[1][i_37_])) >> 16);
						}
						Class11.anIntArray200[i_29_] = i_35_;
						i_26_ = aClass29_197.method311(0, i + 1);
					}
					if (i_29_ >= i - i_27_) {
						break;
					}
					i_27_ = aClass36_196.method355(0, true, i_26_ / 65536.0F);
					i_28_ = aClass36_196.method355(1, true, i_26_ / 65536.0F);
					i_30_ += i_34_;
				}
				for (/**/; i_29_ < i; i_29_++) {
					int i_38_ = 0;
					for (int i_39_ = i_29_ + i_27_ - i; i_39_ < i_27_; i_39_++) {
						i_38_ += (int) (((long) (Class11.anIntArray200[i_29_ + i_27_ - 1 - i_39_]) * (long) (Class36.anIntArrayArray618[0][i_39_])) >> 16);
					}
					for (int i_40_ = 0; i_40_ < i_28_; i_40_++) {
						i_38_ -= (int) (((long) Class11.anIntArray200[i_29_ - 1 - i_40_] * (long) (Class36.anIntArrayArray618[1][i_40_])) >> 16);
					}
					Class11.anIntArray200[i_29_] = i_38_;
					i_26_ = aClass29_197.method311(0, i + 1);
				}
			}
		}
		for (int i_41_ = 0; i_41_ < i; i_41_++) {
			if (Class11.anIntArray200[i_41_] < -32768) {
				Class11.anIntArray200[i_41_] = -32768;
			}
			if (Class11.anIntArray200[i_41_] > 32767) {
				Class11.anIntArray200[i_41_] = 32767;
			}
		}
		return Class11.anIntArray200;
	}

	private final int method192(int i, int i_42_, int i_43_, int i_44_) {
		while (i >= 0) {
			anInt182 = -409;
		}
		if (i_43_ == 1) {
			if ((i_42_ & 0x7fff) < 16384) {
				return i_44_;
			}
			return -i_44_;
		}
		if (i_43_ == 2) {
			return Class11.anIntArray202[i_42_ & 0x7fff] * i_44_ >> 14;
		}
		if (i_43_ == 3) {
			return ((i_42_ & 0x7fff) * i_44_ >> 14) - i_44_;
		}
		if (i_43_ == 4) {
			return Class11.anIntArray201[i_42_ / 2607 & 0x7fff] * i_44_;
		}
		return 0;
	}

	public final void method193(byte i, Packet packet) {
		aClass29_183 = new Class29();
		aClass29_183.method308(aByte181, packet);
		aClass29_184 = new Class29();
		aClass29_184.method308(aByte181, packet);
		int i_45_ = packet.getUByte();
		if (i_45_ != 0) {
			packet.offset--;
			aClass29_185 = new Class29();
			aClass29_185.method308(aByte181, packet);
			aClass29_186 = new Class29();
			aClass29_186.method308(aByte181, packet);
		}
		i_45_ = packet.getUByte();
		if (i != 6) {
			for (int i_46_ = 1; i_46_ > 0; i_46_++) {
				/* empty */
			}
		}
		if (i_45_ != 0) {
			packet.offset--;
			aClass29_187 = new Class29();
			aClass29_187.method308(aByte181, packet);
			aClass29_188 = new Class29();
			aClass29_188.method308(aByte181, packet);
		}
		i_45_ = packet.getUByte();
		if (i_45_ != 0) {
			packet.offset--;
			aClass29_189 = new Class29();
			aClass29_189.method308(aByte181, packet);
			aClass29_190 = new Class29();
			aClass29_190.method308(aByte181, packet);
		}
		for (int i_47_ = 0; i_47_ < 10; i_47_++) {
			int i_48_ = packet.getSmart();
			if (i_48_ == 0) {
				break;
			}
			anIntArray191[i_47_] = i_48_;
			anIntArray192[i_47_] = packet.getUSmart();
			anIntArray193[i_47_] = packet.getSmart();
		}
		anInt194 = packet.getSmart();
		anInt195 = packet.getSmart();
		(this).anInt198 = packet.getUShort();
		(this).anInt199 = packet.getUShort();
		aClass36_196 = new Class36();
		aClass29_197 = new Class29();
		aClass36_196.method356(-954, aClass29_197, packet);
	}
}
